
<div style="POSITION: relative" id="content">
  <h3>easyUI 格式化ComboBox </h3>
  <div id="article_content" class="article_content">
	<p>这个教程像你展示如何创建一个简单的<span style="font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; font-size:14px; text-align:left">combobox 让它显示图片项在下拉框中,你可以使用<span style="font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; font-size:14px; text-align:left">formatter
 函数在<span style="font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; font-size:14px; text-align:left">combobox 去告诉它如何&#26684;式化每一个条目.</span></span></span></p>
<p><img src="documentation/images/1344914154_7204.png" alt=""><br>
</p>
<h4 style="font-size:16px; color:rgb(204,0,0); margin:10px 0px; font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; text-align:left">
  创建 Image Combobox</h4>
<pre name="code" class="html">&lt;input id=&quot;cc&quot; style=&quot;width:100px&quot;  
        url=&quot;data/combobox_data.json&quot;  
        valueField=&quot;id&quot; textField=&quot;text&quot;&gt;  
&lt;/input&gt;  </pre><pre name="code" class="javascript">$('#cc').combobox({  
    formatter:function(row){  
        var imageFile = 'images/' + row.icon;  
        return '&lt;img class=&quot;item-img&quot; src=&quot;'+imageFile+'&quot;/&gt;&lt;span class=&quot;item-text&quot;&gt;'+row.text+'&lt;/span&gt;';  
    }  
});  </pre>
<h4 style="font-size:16px; color:rgb(204,0,0); margin:10px 0px; font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; text-align:left">
下载 EasyUI 示例代码:</h4>
<div style="font-size:14px; font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; text-align:left; padding-left:50px">
<a href="http://www.jeasyui.com/tutorial/form/downloads/easyui-form4-demo.zip" target="_blank" class="download-link" style="color:rgb(0,0,255)">easyui-form-demo.zip</a></div>
<br>
  </div>
</div>
<SCRIPT type=text/javascript>
	dp.SyntaxHighlighter.ClipboardSwf = 'documentation/js/clipboard.swf'/*tpa=http://jeasyui.com/SyntaxHighlighter/Scripts/clipboard.swf*/;
	dp.SyntaxHighlighter.HighlightAll('code');
</SCRIPT>